Conversation
…anup Fix save creating duplicates by passing existingOverrideId to update instead of always inserting. Isolate test data overrides with "test:" date key prefix. Simplify editing flow by removing intermediate ActivityOverrideSheet and override badge. Add FAB for creating new activities. STILL overrides now suppress sessions without appearing in results. Add delete button for all sessions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ndows Override and manually created sessions now get their stepCount computed from sensor windows that fall within their time range, matching the behavior of detected sessions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Extract shared step counting to `sumStepsInRange()` extension on `List<SensorWindow>`, used by both RecomputeActivitySessionsUseCase and MergeSessionOverridesUseCase - Add `isNew` property and `effectiveEndTime()` to ActivitySession, removing magic `startTransitionId == 0` checks and repeated `endTime ?: (startTime + 30 * 60_000L)` fallbacks - Deduplicate ViewModel's two `combine` blocks into a single block with conditional session/window flows - Remove `_useTestData` MutableStateFlow mutation inside reactive pipeline; read preference directly in `saveSessionOverride` - Move duplicate `regionColor()` extension to `ActivityColors.colorFor()` - Use shared `activityLabel()` in SessionEditSheet instead of inline when - Extract `closeEditSheet` lambda in ActivitiesScreen - Add tests: sumStepsInRange boundaries, window edge cases, overlapping overrides, step count preservation, isNew, effectiveEndTime Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
saveSessionOverridenow acceptsexistingOverrideIdand callsupdate()for existing overrides instead of alwaysinsert()"test:"in test mode so they don't appear in real data modeActivityOverrideSheetand override badge; tapping a session opensSessionEditSheetdirectlymergeSessionOverridesfilters STILL overrides from results instead of showing themTest plan
mergeSessionOverridesincluding STILL suppression🤖 Generated with Claude Code